<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Util
 *
 * @author minhhq
 */
class Core_Util extends MKT_Util {
    public static function getExpiredUpdatingTime() {
        return time() - ALLOWED_UPDATING_TIME;
    }
    
    public static function getIdPage($id_social) {
        $length = strpos($id_social, "_");
        return substr($id_social, 0, $length);        
    }
    
    public static function getBeginDate($time) {
        $date_time = new DateTime();
        $date_time->setTimestamp($time)->setTime(0,0,0);
        return $date_time->getTimestamp();
    }
}

?>
